import json
import logging


class JsonUtil(object):

    @classmethod
    def param_data(cls, path):
        '''
        用于参数化，解析json文件
        :param path: json文件路径
        :return:返回元组型列表[(),(),...]
        '''
        with open(path, 'r', encoding='utf-8') as f:
            json_data = json.load(f)

            json_list = []

            for i in json_data:
                json_list.append(tuple(i.values()))

            logging.info(json_list)

            return json_list